import java.text.SimpleDateFormat;
import java.util.Date;

public class StudentApplication {
    public static void main(String[] args) throws Exception {
        // 创建一个Undergraduate对象
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date undergraduateBirthday = sdf.parse("2003-06-01");
        Undergraduate undergraduate = new Undergraduate();
        undergraduate.setName("王小二");
        undergraduate.setGender('男');
        undergraduate.setBirthDay(undergraduateBirthday);
        undergraduate.setSchool("上海大学");
        undergraduate.setStuId("21128981");
        undergraduate.setCategory("大学本科生");
        undergraduate.setScore(new double[]{89.5, 82, 87, 73});
        undergraduate.setStatus(false);

        // 创建一个Master对象
        Date masterBirthday = sdf.parse("2001-06-12");
        Master master = new Master();
        master.setName("李燕");
        master.setGender('女');
        master.setBirthDay(masterBirthday);
        master.setSchool("上海大学");
        master.setStuId("10306");
        master.setCategory("硕士研究生");
        master.setScore(new double[]{70, 52.5, 95, 88, 89, 91});
        master.setThesisLevel('B');
        master.setStatus(false);

        // 创建StudentDegree对象并测试学位授予
        StudentDegree studentDegree = new StudentDegree();
        studentDegree.issueDegree(undergraduate);
        studentDegree.issueDegree(master);
    }
}
